fetcher: Move the SoupSession to a separate thread
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 13 Nov 2015 20:44:20 +0000 (15:44 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Mon, 14 Dec 2015 16:11:29 +0000 (11:11 -0500)
commit54066420cf1d2f7aed7817c6f94758cc70752fc4
treeea0e3da3dc58211400d1d4dcbdb93238319b180f
parentaf30fc764a25c1888968d3a69bfc9b8e377427c1
fetcher: Move the SoupSession to a separate thread

Move the SoupSession to a separate thread with its own isolated main
context and main loop.  All interaction with the SoupSession occurs
by way of idle sources attached to the session's main context, which
execute on the session's thread.

This should solve the problem of running an asynchronous fetch request
synchronously by pushing a new thread-default main context and iterating
a main loop until the request completes.  Prior to this, the new thread-
default main context would interfere with the SoupSession's own async
processing.
src/libostree/ostree-fetcher.c